// 引入创建stroe的方式
import { createStore, applyMiddleware, combineReducers } from 'redux'

//引入相应的 reducer
import count_reducer from './count_reducer'
import personReducer from './person_reducer'

// 处理异步action
import thunk from 'redux-thunk'

// 汇总reducer 变为一个reducer
const allReducer = combineReducers({
  count: count_reducer,
  person: personReducer
})
//暴露 store
export default createStore(allReducer, applyMiddleware(thunk))
